﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace github.heerheer.card2.UI.Views.Dialog
{
    /// <summary>
    /// VariableDialog.xaml 的交互逻辑
    /// </summary>
    public partial class VariableDialog : Window
    {
        ObservableCollection<VariableInfo> VariableInfos { get; set; } = new ObservableCollection<VariableInfo>()
        {
            new VariableInfo("通用变量","{at}","发消息的人"),
            new VariableInfo("卡池","{Pool.Name}","卡池名称"),
            new VariableInfo("卡池","{Pool.Cost}","卡池消耗"),
            new VariableInfo("卡池","{Pool.CostItem}","卡池消耗品"),
            new VariableInfo("等级","{Level.Name}","等级名称"),
            new VariableInfo("等级","{Level.Desc}","等级描述"),
            new VariableInfo("等级","{Level.CardCount}","等级卡片数量"),
            new VariableInfo("卡片","{Card.Name}","卡片名称"),
            new VariableInfo("卡片","{Card}","卡片名称"),
            new VariableInfo("卡片","{Card.Desc}","卡片描述"),
            new VariableInfo("卡片","{Card.UP}","卡片倍率"),



        };

        public VariableDialog()
        {
            InitializeComponent();
            VL.ItemsSource = VariableInfos;
            
        }

        private void Btn_Copy(object sender,RoutedEventArgs e)
        {
            var tx = ((Button)sender).Tag.ToString();
            Clipboard.SetText(tx);
            MessageBox.Show("复制成功~"+tx);
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }

    class VariableInfo
    {
        public VariableInfo(string a, string b , string c)
        {
            Sort = a;
            Variable = b;
            Content = c;
        }
        public string Sort { get; set; }
        public string Variable { get; set; }
        public string Content { get; set; }
    }
}
